<?php

namespace App\Http\Middleware\Shoper;

use Closure;

class LoginMiddleware
{
    /**
     * Handle an incoming request.
     *
     */
    public function handle($request, Closure $next)
    {
        // 检测session信息
        $session = Session('id');

        if(empty($session)) {
            return redirect('/adminShop/shoperLogin');
        }else{
            return $next($request);
        }
    }
}
